package com.dushibao.util;

import java.util.List;

public class CommUtils {
    public static boolean contains(List lists,Object obj){
        return lists.contains(obj);
    }

    /**
     * 以exts结尾 或者包含 比如/user/loginFinish 是登录请求 不需要拦截
     * @param exts
     * @param path
     * @return
     */
    public static boolean endWith(List<String> exts,String path){
        for (String ext : exts) {
            if(path.endsWith(ext) || path.contains(ext)){
                return true;
            }
        }
        return false;
    }
}
